libmymath.so:add.o sub.o
	gcc -shared -o $@ $^ # 生成共享库格式
%.o:%.c
	gcc -fPIC -c $< # 产生位置无关码

.PHONY:output
output:
	mkdir -p mymath/include
	mkdir -p mymath/lib 
	cp -f *.h mymath/include
	cp -f *.so mymath/lib 

.PHONY:clean
clean:
	rm -rf *.o *.so mymath
